home *** CD-ROM | disk | FTP | other *** search
- on getLabelName theFrame
- set theFrame to default(theFrame, the frame)
- set lastLine to the number of lines in the labelList - 1
- repeat with i = 1 to lastLine
- if theFrame < label(line i of the labelList) then
- if i > 1 then
- return line i - 1 of the labelList
- else
- return EMPTY
- end if
- exit
- end if
- end repeat
- return line lastLine of the labelList
- end
-
- on default paramVar, defaultVal
- if voidp(paramVar) then
- set paramVal to defaultVal
- else
- set paramVal to paramVar
- end if
- return paramVal
- end
-
- on localPath thePath
- if the platform contains "Macintosh" then
- set pathDelim to ":"
- set otherDelim to "/"
- else
- set pathDelim to "\"
- set otherDelim to ":"
- end if
- set rVal to replaceString(thePath, otherDelim, pathDelim)
- set rVal to replaceString(thePath, "/", pathDelim)
- return rVal
- end
-
- on replaceString input, fromChunk, toChunk
- set output to EMPTY
- repeat while input contains fromChunk
- set position to offset(fromChunk, input) - 1
- if position then
- put char 1 to position of input after output
- end if
- put toChunk after output
- delete char 1 to position + length(fromChunk) of input
- end repeat
- put input after output
- return output
- end
-